extends menu
 
block market_view
  .row
    .col-md-12  
      .panel.panel-default
        .panel-heading
          strong #{settings.locale.ccex} - #{marketdata.coin}/#{marketdata.exchange} - #{settings.locale.mkt_hours}
          a(href='#')
            span.fa.fa-line-chart.pull-right.view-chart-disabled.iquidus.market-toggle(data-toggle='tooltip', data-placement='bottom', title='#{settings.locale.mkt_no_chart}') 
        table.table.table-bordered.summary-table 
          thead
            tr
              th #{settings.locale.mkt_high}
              th #{settings.locale.mkt_low}
              th.hidden-xs #{settings.locale.mkt_top_bid}
              th.hidden-xs #{settings.locale.mkt_top_ask}
              th.hidden-xs #{settings.locale.mkt_last}
              th #{settings.locale.mkt_volume} #{marketdata.coin}
              th #{settings.locale.mkt_volume} #{marketdata.exchange}
          tbody
            tr
              td #{marketdata.data.summary.high}
              td #{marketdata.data.summary.low}
              td.hidden-xs #{marketdata.data.summary.bid}
              td.hidden-xs #{marketdata.data.summary.ask}
              td.hidden-xs #{marketdata.data.summary.last}
              td #{marketdata.data.summary.volume}
              td #{marketdata.data.summary.volume_btc}
  .row
    .col-md-6.col-xs-12
      .panel.panel-default
        .panel-heading
          h3.panel-title #{settings.locale.mkt_buy_orders}
        table.table.table-striped.table-bordered.order-table
          thead
            tr
              th #{settings.locale.mkt_price} (#{marketdata.exchange})
              th #{settings.locale.mkt_amount} (#{marketdata.coin})
              th.hidden-xs #{settings.locale.mkt_total} (#{marketdata.exchange})
          tbody
            each buy in marketdata.data.buys
              tr
                td
                  =buy.price
                td
                  =buy.amount
                td.hidden-xs
                  =buy.total

    .col-md-6.col-xs-12
      .panel.panel-default
        .panel-heading
          h3.panel-title #{settings.locale.mkt_sell_orders}
        table.table.table-striped.table-bordered.order-table
          thead
            tr
              th #{settings.locale.mkt_price} (#{marketdata.exchange})
              th #{settings.locale.mkt_amount} (#{marketdata.coin})
              th.hidden-xs #{settings.locale.mkt_total} (#{marketdata.exchange})
          tbody
            each sell in marketdata.data.sells
              tr
                td
                  =sell.price
                td
                  =sell.amount
                td.hidden-xs
                  =sell.total
  .row   
    .col-md-12
      .panel.panel-default
        .panel-heading
          h3.panel-title #{settings.locale.mkt_trade_history}
        table.table.table-hover.history-table.table-bordered(cellspacing="0")
          thead
            tr
              th.hidden-xs #{settings.locale.mkt_type}
              th #{settings.locale.mkt_amount} (#{marketdata.coin})
              th #{settings.locale.mkt_price} (#{marketdata.exchange})
              th #{settings.locale.mkt_total} (#{marketdata.exchange})
              th.hidden-xs #{settings.locale.mkt_time_stamp}
          tbody
            each order in marketdata.data.history
              if order.ordertype == 'Buy'
                tr.success
                  td.hidden-xs
                    =order.ordertype
                  td
                    =order.amount
                  td
                    =order.price
                  td
                    =order.total
                  td.hidden-xs
                    =(new Date(order.timestamp * 1000).toUTCString())
              else
                tr.danger 
                  td.hidden-xs
                    =order.ordertype
                  td
                    =order.amount
                  td
                    =order.price
                  td
                    =order.total
                  td.hidden-xs
                     =(new Date(order.timestamp * 1000).toUTCString())

      .footer-padding

